import React, { Component } from 'react';
import "../styles/QuanShou.scss"
import * as service from "../api/index"
import { NavBar } from 'antd-mobile'



class QuanShou extends Component {
    state = {
        shouji: []
    }
    async componentDidMount() {
        // //主页游记
        var res = await service.quan_shouji()
        console.log(res.data[0]);
        this.setState({ shouji: res.data[0] })
    }
    render() {
        return (
            <div className='quanbushouji'>
                <div className="top">
                    <NavBar onBack={() => { this.props.history.go(-1) }}> <h3>全部手记</h3> </NavBar>
                </div>
                <div className="shouji">
                    {
                        this.state.shouji.pic?.map((item, index) => {
                            return (
                                <div className="shouji_one" key={index}>
                                    <img src={item.img} alt="" />
                                    <p>{this.state.shouji.jieshao}</p>
                                    <div className="mao">
                                        <p>{this.state.shouji.name}</p>
                                        <p>❤{this.state.shouji.dianzan}</p>
                                    </div>
                                </div>
                            )
                        })
                    }
                </div>
            </div>
        );
    }
}

export default QuanShou;